from django.conf.urls.defaults import *
#from students import views
# The next two lines enable the admin and load each admin.py file:
from django.views.generic.simple import direct_to_template
from django.contrib import admin
from django.views.generic.simple import direct_to_template
admin.autodiscover()

urlpatterns = patterns('',
    #(r'^admin/(.*)', admin.site.root),
    #(r'^marks_add/', views.marks_add),
    #(r'^attendance_add/', views.attendance_add),
    (r'^admin/ams/home/', 'sms.ams.views.admin_home'),
    #(r'^admin/(.*)', admin.site.root),
    (r'^admin/', include(admin.site.urls)),
    (r'^marks_add/', 'sms.students.views.marks_add'),
    (r'^attendance_add/', 'sms.students.views.attendance_add'),
    (r'^report/', 'sms.students.views.report'),
    (r'^ams/', 'sms.ams.views.get_barcode'),
    (r'^leave/', 'sms.ams.views.app_leave'),
    (r'^leave_report/', 'sms.ams.views.report_leave'),
    (r'^ams_report/', 'sms.ams.views.monthly_report'),
    (r'^ams_daily_report/', 'sms.ams.views.daily_report'),
    (r'^ams_display/', 'sms.ams.views.ams_display'),
    (r'^fee/', 'sms.fees.views.fee_receipt'),
    (r'^fee_receipt/', 'sms.fees.views.reprint_receipt'),
    (r'^fee_report/', 'sms.fees.views.fee_report'),
    (r'^reportPDF/', 'sms.students.views.report_pdf'),
    (r'^certificatePDF/', 'sms.students.views.certificate_pdf'),
    (r'^cardsPDF/', 'sms.students.views.cards_pdf'),
    (r'^schoolLeavingPDF/', 'sms.students.views.school_leaving_pdf'),
    (r'^fee_collection/', 'sms.fees.views.fee_collection'),
    (r'^ams_dayrules/', 'sms.ams.views.add_dayrules'),
    (r'^competition_add/', 'sms.students.views.competition_add'),
    (r'^elocution_add/', 'sms.students.views.elocution_add'),
    (r'^project_add/', 'sms.students.views.project_add'),
    (r'^abhivyaktivikas_add/', 'sms.students.views.abhivyaktivikas_add'),
    (r'^competitiveexam_add/', 'sms.students.views.competitiveexam_add'),
    (r'^cocurricular_add/', 'sms.students.views.cocurricular_add'),
    (r'^socialactivity_add/', 'sms.students.views.socialactivity_add'),
    (r'^physicalfitnessinfo_add/', 'sms.students.views.physicalfitnessinfo_add'),
    (r'^workexperience_add/', 'sms.students.views.workexperience_add'),
    (r'^physicaleducation_add/', 'sms.students.views.physicaleducation_add'),
    (r'^thinkingskill_add/', 'sms.students.views.thinkingskill_add'),
    (r'^socialskill_add/', 'sms.students.views.socialskill_add'),
    (r'^emotionalskill_add/', 'sms.students.views.emotionalskill_add'),
    (r'^attitudetowardsschool_add/', 'sms.students.views.attitudetowardsschool_add'),
    (r'^values_add/', 'sms.students.views.values_add'),
    (r'^medicalreport_add/', 'sms.students.views.medicalreport_add'),
    (r'^scrap_add/', 'sms.students.views.scrap_add'),
    (r'^names_sheet/','students.views.generate_name_columns'),
    (r'^display_report/(?P<regno>\d+)/(?P<year>\d{4}\-\d{4})','students.views.display_report'),
    (r'^marksTablesPDF/', 'students.views.marks_tables_pdf'),
(r'^accounts/', include('registration.urls')),
#(r'^accounts/', include('registration.backends.default.urls')),
(r'^$', direct_to_template,  { 'template': 'index.html' }, 'index'),
    #(r'^pravesh/add', 'sms.pravesh.views.add'),
    #(r'^pravesh/student/(\d+)/edit/?','sms.pravesh.views.edit'),
    #(r'^pravesh/hallticket/(\d+)/?','sms.pravesh.views.display_hallticket'),
    #(r'^pravesh/generate_hallticket','sms.pravesh.views.generate_hallticket'),
    #(r'^pravesh/generate_report','sms.pravesh.views.generate_classreport'),
    #(r'^pravesh/?','sms.pravesh.views.index'),
    ##(r'^pravesh/student/(\d+)/edit/?$','sms.pravesh.views.edit'),
#
    (r'^jp_sms/admin/ams/home/', 'sms.ams.views.admin_home'),
    #(r'^jp_sms/admin/(.*)', admin.site.root),
    (r'^jp_sms/admin/', include(admin.site.urls)),
    (r'^jp_sms/marks_add/', 'sms.students.views.marks_add'),
    (r'^jp_sms/attendance_add/', 'sms.students.views.attendance_add'),
    (r'^jp_sms/report/', 'sms.students.views.report'),
    (r'^jp_sms/ams/$', 'sms.ams.views.get_barcode'),
    (r'^jp_sms/leave/$', 'sms.ams.views.app_leave'),
    (r'^jp_sms/ams_report/', 'sms.ams.views.monthly_report'),
    (r'^jp_sms/ams_daily_report/', 'sms.ams.views.daily_report'),
    (r'^jp_sms/fee_report/', 'sms.fees.views.fee_report'),
    (r'^jp_sms/fee/', 'sms.fees.views.fee_receipt'),
    (r'^jp_sms/fee_receipt/', 'sms.fees.views.reprint_receipt'),
    (r'^jp_sms/reportPDF/', 'sms.students.views.report_pdf'),
    (r'^jp_sms/ams_display/', 'sms.ams.views.ams_display'),
    (r'^jp_sms/certificatePDF/', 'sms.students.views.certificate_pdf'),
    (r'^jp_sms/cardsPDF/', 'students.views.cards_pdf'),
    (r'^jp_sms/schoolLeavingPDF/', 'sms.students.views.school_leaving_pdf'),
    (r'^jp_sms/fee_collection/', 'sms.fees.views.fee_collection'),
    (r'^jp_sms/ams_dayrules/', 'sms.ams.views.add_dayrules'),
    (r'^jp_sms/competition_add/', 'sms.students.views.competition_add'),
    (r'^jp_sms/elocution_add/', 'sms.students.views.elocution_add'),
    (r'^jp_sms/project_add/', 'sms.students.views.project_add'),
    (r'^jp_sms/abhivyaktivikas_add/', 'sms.students.views.abhivyaktivikas_add'),
    (r'^jp_sms/competitiveexam_add/', 'sms.students.views.competitiveexam_add'),
    (r'^jp_sms/cocurricular_add/', 'sms.students.views.cocurricular_add'),
    (r'^jp_sms/socialactivity_add/', 'sms.students.views.socialactivity_add'),
    (r'^jp_sms/physicalfitnessinfo_add/', 'sms.students.views.physicalfitnessinfo_add'),
    (r'^jp_sms/workexperience_add/', 'sms.students.views.workexperience_add'),
    (r'^jp_sms/physicaleducation_add/', 'sms.students.views.physicaleducation_add'),
    (r'^jp_sms/thinkingskill_add/', 'sms.students.views.thinkingskill_add'),
    (r'^jp_sms/socialskill_add/', 'sms.students.views.socialskill_add'),
    (r'^jp_sms/emotionalskill_add/', 'sms.students.views.emotionalskill_add'),
    (r'^jp_sms/attitudetowardsschool_add/', 'sms.students.views.attitudetowardsschool_add'),
    (r'^jp_sms/values_add/', 'sms.students.views.values_add'),
    (r'^jp_sms/medicalreport_add/', 'sms.students.views.medicalreport_add'),
    (r'^jp_sms/names_sheet/','students.views.generate_name_columns'),
    (r'^jp_sms/display_report/(?P<regno>\d+)/(?P<year>\d{4}\-\d{4})','students.views.display_report'),
    (r'^jp_sms/marksTablesPDF/', 'students.views.marks_tables_pdf'),
(r'^jp_sms/accounts/', include('registration.urls')),
(r'^jp_sms/?$', direct_to_template,  { 'template': 'index.html' }, 'index'),
    #(r'^jp_sms/pravesh/add', 'sms.pravesh.views.add'),
    #(r'^jp_sms/pravesh/hallticket/(\d+)/?','sms.pravesh.views.display_hallticket'),
    #(r'^jp_sms/pravesh/generate_hallticket','sms.pravesh.views.generate_hallticket'),
    #(r'^jp_sms/pravesh/student/(\d+)/edit/?$','sms.pravesh.views.edit'),
    #(r'^jp_sms/pravesh/generate_report','sms.pravesh.views.generate_classreport'),
    ##(r'^jp_sms/pravesh/edit/(\d+)/?', 'sms.pravesh.views.edit'),
    #(r'^jp_sms/pravesh/?','sms.pravesh.views.index'),
    (r'^parents/','students.views.student_summary'),
    (r'^jp_sms/parents/','students.views.student_summary'),
    (r'^parents/fee','fees.views.fee_parent'),
    (r'^sms_send/','students.views.send_sms_students'),
    (r'^jp_sms/sms_send/','students.views.send_sms_students'),
    (r'^additionalinformation_add/', 'students.views.additionalinfo_add'),
    (r'^jp_sms/additionalinformation_add/', 'students.views.additionalinfo_add'),
    ##(r'^accounts/', include('registration.backends.default.urls')),
    (r'^accounts/', include('registration.urls')),
    (r'^$', direct_to_template,  { 'template': 'index.html' }, 'index'),
    (r'^pravesh/add', 'sms.pravesh.views.add'),
    (r'^pravesh/hallticket/(\d+)/?$','sms.pravesh.views.display_hallticket'),
    (r'^pravesh/student/(\d+)/edit/?$','sms.pravesh.views.edit'),
    (r'^pravesh/generate_hallticket','sms.pravesh.views.generate_hallticket'),
    (r'^pravesh/generate_report','sms.pravesh.views.generate_classreport'),
    (r'^pravesh/?','sms.pravesh.views.index'),
    (r'^mailinglist/display', 'sms.mailinglist.views.display'),
    #(r'^useradd/', views.user_add),
    # ... the rest of your URLs here ...
)
